<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OptionsPricing: models::GBMSolverAdaptor::GBMSolverAdaptor Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">OptionsPricing
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>models</b>      </li>
      <li class="navelem"><b>GBMSolverAdaptor</b>      </li>
      <li class="navelem"><a class="el" href="classmodels_1_1GBMSolverAdaptor_1_1GBMSolverAdaptor.html">GBMSolverAdaptor</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">models::GBMSolverAdaptor::GBMSolverAdaptor Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="models::GBMSolverAdaptor::GBMSolverAdaptor" --><!-- doxytag: inherits="CDRSolver::CDRSolver" -->
<p>Inherits CDRSolver.</p>

<p><a href="classmodels_1_1GBMSolverAdaptor_1_1GBMSolverAdaptor-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmodels_1_1GBMSolverAdaptor_1_1GBMSolverAdaptor.html#a747a7bee14614443475113c924575fa8">__init__</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmodels_1_1GBMSolverAdaptor_1_1GBMSolverAdaptor.html#afb36345db4edf78cd2d10e2e53c770fe">get_price_history</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmodels_1_1GBMSolverAdaptor_1_1GBMSolverAdaptor.html#a20b054c92bb0786e887336e1b886fca9">get_stock_pres_val</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmodels_1_1GBMSolverAdaptor_1_1GBMSolverAdaptor.html#a34894ab033d936cbdbaf5fe903e3cb5b">get_strike</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmodels_1_1GBMSolverAdaptor_1_1GBMSolverAdaptor.html#ab266b4bece640f66342b3f826807585e">set_option_cos</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><div class="fragment"><pre class="fragment">Finite-Element solver for the Black-Scholes PDE

 The problem to solve is given by:

  Function
    f = f(t,x) over the rectangle 0 &lt;= t &lt;= T, Bl &lt;= x &lt;= Bu.
  PDE
    rf = df/dt + rx df/dx + (1/2)(sigma x)^2 d^f/dx^2
  Boundary conditions
    given on the three sides of the rectangle
    t = T; x = Bl; x = Bu

 where r, sigma, T, Bl, Bu are given parameters.
  </pre></div> 
<p>Definition at line <a class="el" href="GBMSolverAdaptor_8py_source.html#l00040">40</a> of file <a class="el" href="GBMSolverAdaptor_8py_source.html">GBMSolverAdaptor.py</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a747a7bee14614443475113c924575fa8"></a><!-- doxytag: member="models::GBMSolverAdaptor::GBMSolverAdaptor::__init__" ref="a747a7bee14614443475113c924575fa8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def models::GBMSolverAdaptor::GBMSolverAdaptor::__init__ </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>time2_mat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>spval</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>strike</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>ntime_steps</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>nsegs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>smin</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>smax</em> = <code>None</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<div class="fragment"><pre class="fragment">Initialize the finite-difference solver.

     Parameters:
      time2_mat - maturity time.
      spval    - Stoke present value.
      strike - strike price.
      ntime_steps - number of time steps to take when discretizing PDE
      nsegs  - number of segments in the finite element discretization
      smin  - lower bound for stock price
      smax  - upper bound for stock price
    </pre></div> 
<p>Definition at line <a class="el" href="GBMSolverAdaptor_8py_source.html#l00060">60</a> of file <a class="el" href="GBMSolverAdaptor_8py_source.html">GBMSolverAdaptor.py</a>.</p>

<p>References <a class="el" href="GBMSolverAdaptor_8py_source.html#l00070">m_cut_thr</a>, <a class="el" href="testCompareAccurancy_8py_source.html#l00046">testCompareAccurancy::AccurancyTestSuite::m_sigma</a>, <a class="el" href="testGBMPricingEngines_8py_source.html#l00048">testGBMPricingEngines::OptionsTestSuite::m_sigma</a>, <a class="el" href="testCompareAccurancy_8py_source.html#l00100">testCompareAccurancy::PlainVanillaEuroCall::m_sigma</a>, <a class="el" href="testPIdeSolver_8py_source.html#l00122">testPIdeSolver::PIDETestSuite::m_sigma</a>, <a class="el" href="GBMSolverAdaptor_8py_source.html#l00070">m_smax</a>, <a class="el" href="GBMSolverAdaptor_8py_source.html#l00070">m_smin</a>, <a class="el" href="GBMSolverAdaptor_8py_source.html#l00070">m_spot</a>, and <a class="el" href="GBMSolverAdaptor_8py_source.html#l00070">m_strike</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="afb36345db4edf78cd2d10e2e53c770fe"></a><!-- doxytag: member="models::GBMSolverAdaptor::GBMSolverAdaptor::get_price_history" ref="afb36345db4edf78cd2d10e2e53c770fe" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def models::GBMSolverAdaptor::GBMSolverAdaptor::get_price_history </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<div class="fragment"><pre class="fragment">price history. </pre></div> 
<p>Definition at line <a class="el" href="GBMSolverAdaptor_8py_source.html#l00194">194</a> of file <a class="el" href="GBMSolverAdaptor_8py_source.html">GBMSolverAdaptor.py</a>.</p>

<p>References <a class="el" href="DynamicSolverBase_8py_source.html#l00065">models::DynamicSolverBase::DynamicSolverBase::_get_solver_hist()</a>, <a class="el" href="DynamicSolverBase_8py_source.html#l00083">models::DynamicSolverBase::DynamicSolverBase::get_keep_hist()</a>, <a class="el" href="SecondOrderStatic1D_8py_source.html#l00101">models::SecondOrderStatic1D::SecondOrderStatic1D::get_mesh()</a>, <a class="el" href="CDRSolver_8py_source.html#l00125">models::CDRSolver::CDRSolver::get_mesh()</a>, <a class="el" href="Poisson2DFiniteDifference_8py_source.html#l00145">models::Poisson2DFiniteDifference::Poisson2DFiniteDifference::get_mesh()</a>, <a class="el" href="PIDESolver_8py_source.html#l00192">models::PIDESolver::PIDESolver::get_mesh()</a>, <a class="el" href="SecondOrderStatic1D_8py_source.html#l00128">models::SecondOrderStatic1D::SecondOrderStatic1D::get_sfunc()</a>, <a class="el" href="CDRSolver_8py_source.html#l00131">models::CDRSolver::CDRSolver::get_sfunc()</a>, <a class="el" href="PIDESolver_8py_source.html#l00197">models::PIDESolver::PIDESolver::get_sfunc()</a>, and <a class="el" href="GBMSolverAdaptor_8py_source.html#l00070">m_cut_thr</a>.</p>

</div>
</div>
<a class="anchor" id="a20b054c92bb0786e887336e1b886fca9"></a><!-- doxytag: member="models::GBMSolverAdaptor::GBMSolverAdaptor::get_stock_pres_val" ref="a20b054c92bb0786e887336e1b886fca9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def models::GBMSolverAdaptor::GBMSolverAdaptor::get_stock_pres_val </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<div class="fragment"><pre class="fragment">stock present value. </pre></div> 
<p>Definition at line <a class="el" href="GBMSolverAdaptor_8py_source.html#l00189">189</a> of file <a class="el" href="GBMSolverAdaptor_8py_source.html">GBMSolverAdaptor.py</a>.</p>

<p>References <a class="el" href="GBMSolverAdaptor_8py_source.html#l00070">m_spot</a>.</p>

<p>Referenced by <a class="el" href="NumericalOptionGBM_8py_source.html#l00058">models::NumericalOptionGBM::NumericalOptionGBM::set_contract_type()</a>.</p>

</div>
</div>
<a class="anchor" id="a34894ab033d936cbdbaf5fe903e3cb5b"></a><!-- doxytag: member="models::GBMSolverAdaptor::GBMSolverAdaptor::get_strike" ref="a34894ab033d936cbdbaf5fe903e3cb5b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def models::GBMSolverAdaptor::GBMSolverAdaptor::get_strike </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<div class="fragment"><pre class="fragment">get strike value </pre></div> 
<p>Definition at line <a class="el" href="GBMSolverAdaptor_8py_source.html#l00090">90</a> of file <a class="el" href="GBMSolverAdaptor_8py_source.html">GBMSolverAdaptor.py</a>.</p>

<p>References <a class="el" href="GBMSolverAdaptor_8py_source.html#l00070">m_strike</a>.</p>

</div>
</div>
<a class="anchor" id="ab266b4bece640f66342b3f826807585e"></a><!-- doxytag: member="models::GBMSolverAdaptor::GBMSolverAdaptor::set_option_cos" ref="ab266b4bece640f66342b3f826807585e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def models::GBMSolverAdaptor::GBMSolverAdaptor::set_option_cos </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>sigma</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>dividents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>i_rate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>s_is_real</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>q_is_real</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>i_is_real</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<div class="fragment"><pre class="fragment">
      Black scholes is transformed to a diffusion convection reaction
      problem with the following coeffientns

      d = 0.5*self.m_sigma^2
      c = i_rate - dividents - volatility / 2.
      r = -i_rate
    </pre></div> 
<p>Definition at line <a class="el" href="GBMSolverAdaptor_8py_source.html#l00095">95</a> of file <a class="el" href="GBMSolverAdaptor_8py_source.html">GBMSolverAdaptor.py</a>.</p>

<p>References <a class="el" href="SecondOrderStatic1D_8py_source.html#l00101">models::SecondOrderStatic1D::SecondOrderStatic1D::get_mesh()</a>, <a class="el" href="CDRSolver_8py_source.html#l00125">models::CDRSolver::CDRSolver::get_mesh()</a>, <a class="el" href="Poisson2DFiniteDifference_8py_source.html#l00145">models::Poisson2DFiniteDifference::Poisson2DFiniteDifference::get_mesh()</a>, <a class="el" href="PIDESolver_8py_source.html#l00192">models::PIDESolver::PIDESolver::get_mesh()</a>, <a class="el" href="SecondOrderStatic1D_8py_source.html#l00128">models::SecondOrderStatic1D::SecondOrderStatic1D::get_sfunc()</a>, <a class="el" href="CDRSolver_8py_source.html#l00131">models::CDRSolver::CDRSolver::get_sfunc()</a>, <a class="el" href="PIDESolver_8py_source.html#l00197">models::PIDESolver::PIDESolver::get_sfunc()</a>, <a class="el" href="GBMSolverAdaptor_8py_source.html#l00070">m_cut_thr</a>, <a class="el" href="testCompareAccurancy_8py_source.html#l00046">testCompareAccurancy::AccurancyTestSuite::m_sigma</a>, <a class="el" href="testGBMPricingEngines_8py_source.html#l00048">testGBMPricingEngines::OptionsTestSuite::m_sigma</a>, <a class="el" href="testCompareAccurancy_8py_source.html#l00100">testCompareAccurancy::PlainVanillaEuroCall::m_sigma</a>, <a class="el" href="testPIdeSolver_8py_source.html#l00122">testPIdeSolver::PIDETestSuite::m_sigma</a>, <a class="el" href="GBMSolverAdaptor_8py_source.html#l00070">m_strike</a>, and <a class="el" href="CDRSolver_8py_source.html#l00141">models::CDRSolver::CDRSolver::set_diffus_cos()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="GBMSolverAdaptor_8py_source.html">GBMSolverAdaptor.py</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Thu Dec 22 2011 05:17:54 for OptionsPricing by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
